package FileIO;

import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 故我
 * Date: 2023-10-19
 * Time: 20:24
 */
public class IODemo9 {
    public static void main(String[] args) {
        try(Writer writer = new FileWriter("e:/IO/test.txt")){
            writer.write("hello world");
            writer.flush();//手动从缓冲区刷新到文件中
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
